package com.easydata.libPlugin.core;

import com.alibaba.fastjson2.JSONObject;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.Semaphore;

@Slf4j
public abstract class AbstractContext {
    @Getter
    @Setter
    private JSONObject parameters;

    protected AbstractContext() {

    }

    final public Object getGlobalConfig(String key) {
        return parameters.get(key);
    }

    final public Object setGlobalConfig(String key, Object value) {
        return parameters.put(key, value);
    }

    public void log(String fmt, Object... objs) {
        log.info(fmt, objs);
    }

}
